package com.unknowpupil.web.exception;

import lombok.Data;

/**
 * @Classname: MxException
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2019/10/8 18:15
 * @Description:
 * @Version: 1.0
 */
@Data
public class MxException extends Exception {
    private int code ;
    private String message;
    public MxException() {
        this.code = 500;
    }

    public MxException(String message, Throwable cause) {
        super(message,cause);
        this.message = message;
    }

    public MxException(String message, int code) {
        super(message);
        this.code = code;
    }

    public MxException(String message, int code, Throwable cause) {
        super(message,cause);
        this.message = message;
        this.code = code;
    }

    public MxException(String message) {
        super(message);
        this.code = 500;
        this.message = message;
    }

    public String getmessage() {
        return message;
    }

    public void setmessage(String message) {
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
